package com.shrct.businessprocess.common.impl;

import com.shrct.businessprocess.common.RCSaleContractPayConditionCode;
import com.shrct.businessprocess.common.proxy.RCSaleContractPayConditionCodeProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCSALECONTRACTPAYCONDITIONCODE_TYPE")
public class RCSaleContractPayConditionCodeImpl extends CodeImpl implements RCSaleContractPayConditionCode {
  public RCSaleContractPayConditionCodeImpl() {
    super();
  }
  
  public static RCSaleContractPayConditionCode create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.common.RCSaleContractPayConditionCode rCSaleContractPayConditionCode = new com.shrct.businessprocess.common.impl.RCSaleContractPayConditionCodeImpl(
    );
    objectFactory.create(rCSaleContractPayConditionCode);
    return rCSaleContractPayConditionCode;			
    
  }
  
  public static RCSaleContractPayConditionCode createRCSaleContractPayConditionCodeImpl(final IObjectFactory objectFactory, final Procedure1<RCSaleContractPayConditionCode> init) {
    com.shrct.businessprocess.common.RCSaleContractPayConditionCode rCSaleContractPayConditionCode = new com.shrct.businessprocess.common.impl.RCSaleContractPayConditionCodeImpl(
    );
    objectFactory.create(rCSaleContractPayConditionCode);
    init.apply(rCSaleContractPayConditionCode);
    
    return rCSaleContractPayConditionCode;			
    
  }
  
  public RCSaleContractPayConditionCodeProxy toProxy() {
    com.shrct.businessprocess.common.proxy.RCSaleContractPayConditionCodeProxy proxy = new com.shrct.businessprocess.common.proxy.RCSaleContractPayConditionCodeProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
